package com.dutiantech.zimg.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.dutiantech.zimg.utils.ZimgClientUtil;
import com.dutiantech.zimg.utils.ZimgKit;

@Component
public class ZimgReqService {
	
	@Autowired
	private ZimgKit kit;
	
    public String updateImgtoZimg(String fileName) {
    	// 图片后缀获取
    	String ext = fileName.substring(fileName.lastIndexOf(".")+1);
    	
    	return ZimgClientUtil.Send(kit.zimgUrl, fileName, ext);
    }


}
